package com.cch.cooperation.dao.bookkeeping.mapper;

import com.cch.cooperation.dao.bookkeeping.dto.BookkeepingQueryDTO;
import com.cch.cooperation.dao.bookkeeping.model.Bookkeeping;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author cch
 * @since 2025-07-26
 */
public interface BookkeepingMapper extends BaseMapper<Bookkeeping> {

    /**
     * 查询所有流水日期(仅查询日期部分，不包含时间部分
     *
     * @param query 查询条件
     * @return 日期列表
     */
    List<String> queryDistinctDate(BookkeepingQueryDTO query);

    /**
     * 统计流水金额
     *
     * @param query 查询条件
     * @return 收入金额
     */
    BigDecimal sumAmount(BookkeepingQueryDTO query);

}
